import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/arpa-basic-api/authorize',
    method: 'post',
    data
  })
}
// 钉钉鉴权
export function authentication(params) {
  return request({
    url: '/wms/jspal/sign',
    method: 'get',
    params
  })
}
// 钉钉免密登录
export function ddUserLogin(params) {
  return request({
    url: '/wms/dingUser/ddUserLogin',
    method: 'get',
    params
  })
}

export function getInfo(token) {
  return request({
    url: '/arpa-basic-api/getUserInfo',
    method: 'post',
    token
  })
}

export function logout() {
  return request({
    url: '/arpa-basic-api/logout',
    method: 'get'
  })
}

// 修改密码
export function updatePassword(query) {
  return request({
    url: '/arpa-basic-api/users/updatePass',
    method: 'post',
    params: query
  })
}
// 验证手机
export function Verifyphone(query) {
  return request({
    url: '/arpa-basic-api/party/validPhone',
    method: 'get',
    params: {
      phone: query
    }
  })
}
// 注册
export function register(data) {
  return request({
    url: '/arpa-basic-api/party/register',
    method: 'post',
    params: data
  })
}
// 获取验证码
export function Getverificationcode(data) {
  return request({
    url: '/ntocc-tps-api/sms/sendVerificationCode',
    method: 'post',
    params: data
  })
}
